<template>
  <div>
    <van-nav-bar
      :title="props.title"
      v-if="
        route.name == 'index' ||
        route.name == 'list' ||
        route.name == 'car' ||
        route.name == 'my'
      "
    />

    <van-nav-bar v-else left-text="返回" left-arrow @click-left="onClickLeft" />
  </div>
</template>

<script setup>
const onClickLeft = () => history.back();
import { useRoute, useRouter } from "vue-router";

const router = useRouter();
const route = useRoute();

const props = defineProps(["title"]);
</script>

<style lang="scss" scoped></style>
